package com.team1.supervend.domain;

public class Money {
	private float money;

	// constructor used when money provided
	Money( float money ) {
		this.money = money;
	}

	// default constructor used when no money provided
	Money( ) {
		this.money = 0.0f;
	}
	
	public float getMoney(){ return money; }
	public void setMoney( float money ) { this.money = money; }

	public Money times( int quantity )
	{ 
		Money moneyTimesQuantity = new Money();
		moneyTimesQuantity.setMoney( money * quantity );
		return moneyTimesQuantity; 
	}

	public float add( Money amount )
	{ 
		money = money + amount.getMoney();
		return money; 
	}

	public float minus( Money amount )
	{ 
		money = money - amount.getMoney();
		return money; 
	}
}
